# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=lpac
pkgver=2.0.1
pkgrel=0
pkgdesc="C-based eUICC LPA"
url="https://github.com/estkme-group/lpac"
# x86: textrels
arch="all !x86"
license="AGPL-3.0-only AND LGPL-2.0-only AND MIT"
makedepends="
	cmake
	curl-dev
	pcsc-lite-dev
	samurai
	"
subpackages="$pkgname-dbg"
source="$pkgname-$pkgver.tar.gz::https://github.com/estkme-group/lpac/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # no tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_RPATH=/usr/lib/lpac
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8c4981bba9d32b86321b425455b08ed7e44d0a7e4fed8761adc17dec36768b879ad30015b727d750705f29ed405f2c22edd5aa43d7527a20ceb7ad25f9e71a15  lpac-2.0.1.tar.gz
"
